/*Invert Colors*/

//Invert when darkmode
.theme-dark {
    & img[alt*="invertb"],
    & .image-embed[src*="#invertb"] 
    { filter: invert(1) hue-rotate(180deg); }  
    
    img[alt*="invertbc"],
    .image-embed[src*="#invertbc"] 
    { filter: invert(1) hue-rotate(180deg) contrast(1.5); }

} 

//Invert when lighmode
.theme-light {
    & img[alt*="invertw"],
    & .image-embed[src*="#invertw"] 
    { filter: invert(1) hue-rotate(180deg); }
    
    & img[alt*="invertwc"],
    & .image-embed[src*="#invertwc"] {
        filter: invert(1) hue-rotate(180deg) contrast(1.45);
    }
} 

//Flip / Rotations
img {
    &:is(
        [alt*="flip-x"],
        [alt*="flip-horizontal"]
    ) { transform: scale(-1, 1); }
    
    &:is(
        [alt*="flip-y"],
        [alt*="flip-vertical"]
    ) { transform: scale(1, -1); }

    &:is(
        [alt*="flip-xy"],
        [alt*="flip-vertical-horizontal"]
    ) { transform: scale(-1, -1); }
}